%h1 Show Adver
%table
  %tr
    %td{:colspan=>2}
      Basic details
  %tr
    %td 
      %b Owner:
    %td=@advert.user.full_name

  %tr
    %td 
      %b Name:
    %td=@advert.name
  %tr
    %td 
      %b Advertise name:
      %td=@advert.advertiser_name
  %tr
    %td 
      %b Max Views:
      %td=@advert.max_views

  %tr
    %td 
      %b Views:
      %td=@advert.view_count
  
  %tr
    %td 
      %b Is active:
      %td=@advert.is_active

  %tr
    %td 
      %b Is IFrame:
      %td=@advert.is_iframe

  %tr
    %td 
      %b IFrame Src:
      %td=@advert.iframe_src
  
  %tr
    %td 
      %b Is Script:
      %td=@advert.is_script

  %tr
    %td 
      %b Script Content:
      %td=@advert.script_content

  %tr
    %td 
      %b Is Image Banner:
      %td=@advert.is_image_banner

  %tr
    %td 
      %b Image Banner Src:
      %td=@advert.image_banner_src

  %tr
    %td 
      %b Image Banner Href:
      %td=@advert.image_banner_href

  %tr
    %td 
      %b Width:
      %td=@advert.width
  %tr
    %td 
      %b Height:
      %td=@advert.height

  %tr
    %td 
      %b Is custom banner:
      %td=@advert.is_custom_banner

  %tr
    %td 
      %b Custom banner image:
      %td=image_tag(@advert.custom_banner_image.url(:medium))
  %tr
    %td 
      %b Custom banner HREF:
      %td=@advert.custom_banner_href


=link_to "Edit", edit_admin_advert_path(@advert)
=link_to "Remove", [:admin,@advert], :method=>:delete, :confirm=>"Are you sure you want to delete the advert #{@advert.name}"

=link_to "Back", admin_adverts_path